package frsf.cidisi.exercise.tpidemia.search;

import java.util.Collection;
import java.util.HashMap;

import frsf.cidisi.exercise.tpidemia.entidades.Cofre;
import frsf.cidisi.exercise.tpidemia.entidades.PairDist;
import frsf.cidisi.faia.agent.Agent;
import frsf.cidisi.faia.agent.Perception;
import frsf.cidisi.faia.environment.Environment;

public class ArqueologoPerception extends Perception {

	//TODO: Setup Statics
    //public static int UNKNOWN_PERCEPTION = -1;   
	
	
	//TODO: Setup Sensors VER TIPOS DE DATOS
	private String gps;
	private HashMap<String, Cofre> satelite;
	//private HashMap<String, Collection<PairDist>> mapa;
	private int tesoro;
	private Cofre camara;
	private String pirata; //revisar
	
	
 

    public  ArqueologoPerception() {
    	//TODO: Complete Method
    }

    public ArqueologoPerception(Agent agent, Environment environment) {
        super(agent, environment);
    }

    /**
     * This method is used to setup the perception.
     */
    public void initPerception(Agent agentIn, Environment environmentIn) {

        
        Arqueologo agent = (Arqueologo) agentIn;
        Emiroce environment = (Emiroce) environmentIn;
        ArqueologoEstadoEntorno environmentState = environment.getEnvironmentState();
        this.setSatelite(environmentState.getTesoro());
        //System.out.println("\nPerceptionnn: "+satelite.toString());
        this.pirata = environmentState.getPosicionPirata();
        this.gps = environmentState.getArqueologoPosicion(); 
        this.camara = environmentState.getTesoro(gps);
        
        //this.mapa = environmentState.getMap();
        //System.out.print(camara.toString());
        //System.out.println("Percepritr: "+camara.getValor());
        if(environmentState.getTesoro(gps) != null){
        	this.camara = environmentState.getTesoro(gps).clonarCofre();
        	this.camara.CalcularTesoro();
        }
        else
        	this.camara = null;
    }
    
    @Override
    public String toString() {
        String str = "";  

        return str;
    }

	public String getGps() {
		return gps;
	}

	public void setGps(String gps) {
		this.gps = gps;
	}

	public HashMap<String, Cofre> getSatelite() {
		return satelite;
	}

	public void setSatelite(HashMap<String, Cofre> satelite) {
		this.satelite = satelite;
	}

	public int getTesoro() {
		return tesoro;
	}

	public void setTesoro(int tesoro) {
		this.tesoro = tesoro;
	}

	public Cofre getCamara() {
		return camara;
	}

	public void setCamara(Cofre camara) {
		this.camara = camara;
	}

	public String getPirata() {
		return pirata;
	}

	public void setPirata(String pirata) {
		this.pirata = pirata;
	}

    // The following methods are agent-specific:
    //TODO: Complete this section with the agent-specific methods
	
    
	
   
}
